package edu.sctu.liangyuxiang.day20150510.test2;

/**
 * Created by user06 on 2015/5/10.
 */
public class TextTwo {
    protected int number;
    protected int sum;

    public TextTwo(TextOne textone) {
        this.number = textone.number;
        System.out.println(number);
    }

    public int math(){
        for (int i = 0; i <number ; i++) {
            sum+=i;
        }
        return sum;
    }

}
